package com.junzhiit.nengji.shop.model.enums;

import com.bainaeco.framework.exception.InvalidArgumentException;

public enum SystemTypeLevel {
	ONE(1,"一级"),
	TWO(2,"二级"),
	THREE(3,"三级");
	
	private Integer value;
	private String text;

	private SystemTypeLevel(Integer value,String text) {
		this.value = value;
		this.text = text;
	}

	public int toIntValue() {
		return this.value;
	}
	
	public String toStringText() {
		return this.text;
	}

	public static SystemTypeLevel toTypeLevel(int value) {
		if (ONE.value == value) {
			return ONE;
		} else if (TWO.value == value) {
			return TWO;
		}else if (THREE.value == value) {
			return THREE;
		}else {
			throw new InvalidArgumentException("Unknown TypeLevel[" + value + "].");
		}
	}
}
